DEFINE MISSIONS 1              // Total Missions Available
DEFINE MISSION 0 AT @MISSN_12  //Zombie Lab

DEFINE EXTERNAL_SCRIPTS 0 

DEFINE UNKNOWN_EMPTY_SEGMENT 0

DEFINE UNKNOWN_THREADS_MEMORY 500

{$VERSION 3.1.0027}
var
 $PLAYER_CHAR: Player
end // var 
//Main thread starts here
03A4: name_thread 'MAIN' 
//Set the screen BLACK immediately
016A: fade 0 time 0           
01F0: set_max_wanted_level_to 6 
0111: toggle_wasted_busted_check 0 
00C0: set_current_time_hours_to 8 minutes_to 0 
//Loads Tenpenny as #SPECIAL01 or 290
023C: load_special_actor 'TENPEN' as 1 
//Create Player at Station
//04E4: unknown_refresh_game_renderer_at 1541 -1675.4 
Camera.SetAtPos(-1944.8601 , 706.0016, 46.5625)
$PLAYER_CHAR = Player.Create(#NULL, -1944.8601 , 706.0016, 46.5625)
Player.Build($PLAYER_CHAR)
//Changes the player to ped model 290 Tenpenny
09C7: change_player $PLAYER_CHAR model_to 290 
01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 

01B6: set_weather 1 
0001: wait 0 ms 
01B4: toggle_player $PLAYER_CHAR can_move false //We shut down control for the cameras to work 
04BB: select_interior 0 
0629: change_integer_stat 181 to 4 
016C: restart_if_wasted_at -1944.8601  706.0016 46.5625 angle 137.0 town_number 0 
016D: restart_if_busted_at -1944.8601  706.0016 46.5625 angle 90.0 town_number 0 
// Note: your missions have to use the variable defined here
0180: set_on_mission_flag_to $ONMISSION  
0004: $DEFAULT_WAIT_TIME = 250
03E6: remove_text_box 
// START GAME
//start_mission 0                 //First Mission and Only Mission
$CRASH_MARKER = Marker.CreateIconAndSphere(16, 1541.156, -1675.352, 13.552)
$ZOMBO_MARKER = Marker.CreateIconAndSphere(47, -1942.8601, 704.0016, 46.5625)
016A: fade 1 time 500
wait 1000
01B4: toggle_player $PLAYER_CHAR can_move true
$ONMISSION = 0
 
:MAIN_LOOP
0001: wait $DEFAULT_WAIT_TIME ms
00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes
//This code allows restart of mission 
if and
$ONMISSION == 0
00ED:   actor $PLAYER_ACTOR 0 near_point -1942.8601 704.0016 radius 1.0 1.0 on_foot
then
start_mission 0
end
  
0002: jump @MAIN_LOOP 

{Vincent just had to have his zombies... ok but Zaz made a much more graphical one.

Using only coding no graphic editing, I came up with bleeding test subjects. 
They infect others and can only die when shot in the head. aka ZoMBieS. 

Tenpenny is told about a new serium that will stop peoples addiction to all drugs.
His DEA contact tells him it will put all the drug dealers out of business.
Without drug dealers the DEA will be out of business.  He has set it up so Tenpenny
can get the serium and destroy it.}

:MISSN_12
thread 'MISSN_12' 
$ONMISSION = 1

gosub @MISSN_12_BEGIN            

if 
wasted_or_busted 
else_jump @MISSN_12_DONE

gosub @MISSN_12_FAILED

:MISSN_12_DONE
gosub @MISSN_12_CLEANUP            // End Mission Destroy All
end_thread 

:MISSN_12_BEGIN
fade 0 1000
:MISSN_12_FADEOUT00
wait 0
if
not fading
jf @MISSN_12_FADEOUT00
//Zombotech Zombie Lab Staff
0247: load_model #WMOSCI        
0247: load_model #WFYSTEW       
0247: load_model #WMOTR1 
0247: load_model #BMOTR1 
0247: load_model #WMORI 
0247: load_model #WMOST 
0247: load_model #WMYST 
0247: load_model #SBMOTR2
0247: load_model #SWMOTR2
0247: load_model #SWMOTR3
0247: load_model #MAFBOSS
0247: load_model #SOFYBU 
0247: load_model #SBMYCR 
0247: load_model #WMYBU 
0247: load_model #SWFYRI   
0247: load_model #WMOMIB 
0247: load_model #BMYMIB 
0247: load_model #SOMYBU 
0247: load_model #DESERT_EAGLE 
0247: load_model #CR1_DOOR 
0247: load_model #WAREHOUSE_DOOR2B
0247: load_model #KMB_LOCKEDDOOR 
0247: load_model #GREEN_GLOOP 
038B: load_requested_models 

04ED: load_animation "MISC" 
054C: use_GXT_table 'JABM12' 

:MISSN_12_LOAD01
wait 0
if and
Model.Available(#WMOSCI)     //White Male Scientist
Model.Available(#WFYSTEW)    //White Female Stewardess used as greeter  
Model.Available(#WMOTR1)     //White Male Old Tramp 1
Model.Available(#BMOTR1)     //Black Male Old Tramp 1
Model.Available(#WMORI)      //White Male Old Rich
Model.Available(#WMOST)      //White Male Old Street
Model.Available(#WMYST)      //White Male Young Street
Model.Available(#SBMOTR2)    //Black Male Old Tramp 2
Model.Available(#SWMOTR2)    //White Male Old Tramp 2
jf @MISSN_12_LOAD01

:MISSN_12_LOAD02
wait 0 
if and
Model.Available(#SWMOTR3)    //White Male Old Tramp 3
Model.Available(#MAFBOSS)    //Mafia Boss
Model.Available(#SOFYBU)     //Oriential Female Young Business
Model.Available(#SBMYCR)     //Black Male Young Crack Factory
Model.Available(#WMYBU)      //White Male Young Business
Model.Available(#SWFYRI)     //White Female Young Business
Model.Available(#WMOMIB)     //White Male Old Men in Black
Model.Available(#BMYMIB)     //Black Male Young Men in Black
Model.Available(#SOMYBU)     //Oriential Male Young Business
jf @MISSN_12_LOAD02

:MISSN_12_ANIMCHK
wait 0 
if and
Model.Available(#CR1_DOOR)
Model.Available(#WAREHOUSE_DOOR2B)
Model.Available(#KMB_LOCKEDDOOR)
Model.Available(#GREEN_GLOOP)
04EE:   animation "MISC" loaded 
jf @MISSN_12_ANIMCHK 

:MISSN_12_140
//Cutscene Inside the Real Zombotech Building

01B4: toggle_player $PLAYER_CHAR can_move false
02A3: enable_widescreen true 
009A: 2@ = create_actor_pedtype 5 model #WFYSTEW at -1950.8654 672.5848 46.5625
Actor.Health(2@) = 100
Actor.Angle(2@) = 0.0

//Girl walks down hallway
0615: define_AS_pack_begin 15@ 
05D3: AS_actor -1 goto_point -1950.4 680.5 46.5625 mode 4 -1 ms 
05D3: AS_actor -1 goto_point -1950.1 701.6 46.5625 mode 4 -1 ms 
05D3: AS_actor -1 goto_point -1942.5 702.0 46.5625 mode 4 -1 ms 
05D3: AS_actor -1 goto_point -1950.1 701.6 46.5625 mode 4 -1 ms 
0616: define_AS_pack_end 15@ 
0618: assign_actor 2@ to_AS_pack 15@ 
061B: remove_references_to_AS_pack 15@ 
//Camera set follows actor
04C4: store_coords_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 from_actor 2@ with_offset 1.5 1.5 -0.5 
Camera.SetPosition($TEMPVAR_FLOAT_1, $TEMPVAR_FLOAT_2, $TEMPVAR_FLOAT_3, 0.0, 0.0, 0.0)
0159: camera_on_ped 2@ 15 2 

fade 1 1000
:MISSN_12_FADEIN00
wait 0
if
not fading
jf @MISSN_12_FADEIN00

00BC: show_text_highpriority GXT 'ZOM14' time 10000 flag 1  
03CF: load_wav 44800 as 1  
gosub @MISSN_12_PLAYSND
Actor.Angle($PLAYER_ACTOR) = 185.0 

067C: put_camera_on_actor 2@ with_offset -1.5 1.5 -0.5 rotation 0.0 0.0 0.0 0.0 2  //Change Camera

00BC: show_text_highpriority GXT 'ZOM15' time 10000 flag 1  
03CF: load_wav 44801 as 1 
gosub @MISSN_12_PLAYSND

067E: put_camera_on_actor $PLAYER_ACTOR with_offset 0.0 -5.0 4.0 point_to_actor 2@ 0.0 mode 2 

00BC: show_text_highpriority GXT 'ZOM16' time 10000 flag 1  
03CF: load_wav 44802 as 1  
gosub @MISSN_12_PLAYSND

:MISSN_12_141
wait 0
if
00ED:   actor 2@ 0 near_point -1942.5 702.0 radius 1.0 1.0 on_foot
jf @MISSN_12_141

//Looks at Frank
wait 500
0A1D: AS_actor 2@ rotate_to_and_look_at_actor $PLAYER_ACTOR 
0A1D: AS_actor $PLAYER_ACTOR rotate_to_and_look_at_actor 2@ 
04C4: store_coords_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 from_actor 2@ with_offset -3.5 3.5 1.0 
Camera.SetPosition($TEMPVAR_FLOAT_1, $TEMPVAR_FLOAT_2, $TEMPVAR_FLOAT_3, 0.0, 0.0, 0.0)
0159: camera_on_ped 2@ 15 2 
0605: actor 2@ perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 0 0 0 0 time -1

00BC: show_text_highpriority GXT 'ZOM01' time 10000 flag 1  
03CF: load_wav 44803 as 1  
gosub @MISSN_12_PLAYSND
00BC: show_text_highpriority GXT 'ZOM02' time 10000 flag 1  
03CF: load_wav 44804 as 1  
gosub @MISSN_12_PLAYSND
00BC: show_text_highpriority GXT 'ZOM03' time 10000 flag 1  
03CF: load_wav 44805 as 1  
gosub @MISSN_12_PLAYSND

Camera.SetBehindPlayer()
Camera.Restore_WithJumpCut()
02A3: enable_widescreen false
Model.Destroy(#WFYSTEW)
wait 250  
05D3: AS_actor 2@ goto_point -1925.0 702.0439 46.5625 mode 4 -1 ms
 
018A: 90@ = create_checkpoint_at -1951.6056 639.1375 46.5625

01B4: toggle_player $PLAYER_CHAR can_move true

:MISSN_12_200 
wait 0
//Elevator Ride to City Planning Building Interior
if  
00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere -1951.7543 639.9958 46.5625 radius 1.0 1.0 2.0                                    
jf @MISSN_12_200  
0164: disable_marker 90@  

  
01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 85     
fade 0 1000
:MISSN_12_FADEOUT01
wait 0
if
not fading
jf @MISSN_12_FADEOUT01
//Cut Scene Inside the building...
02A3: enable_widescreen true 
0581: enable_radar false 
Player.CanMove($PLAYER_CHAR) = False
04BB: select_interior 3
04F9: set_interior 1 color_to 0 
04E4: unknown_refresh_game_renderer_at 356.6939 172.604 
0581: enable_radar False 

Camera.SetPosition(356.6939, 172.604, 1021.0, 0.0, 0.0, 0.0) 
Camera.PointAt(354.1408, 168.8744, 1020.0, 2)
0860: link_actor $PLAYER_ACTOR to_interior 3 
Actor.PutAt($PLAYER_ACTOR, 350.433, 177.2831, 1019.9844)
Actor.Angle($PLAYER_ACTOR) = 210.0 
009A: 2@ = create_actor_pedtype 4 model #WMOSCI at 352.5852 165.7567 1019.9844
Actor.Health(2@) = 100
Actor.Angle(2@) = 0.0
05BA: AS_actor 2@ move_mouth -1 ms 

//Doors
Object.Create(21@,#CR1_DOOR,0.0,0.0,0.0)
Object.Create(22@,#WAREHOUSE_DOOR2B,0.0,0.0,0.0)
Object.Create(23@,#KMB_LOCKEDDOOR,0.0,0.0,0.0)
Object.Create(24@,#GREEN_GLOOP,0.0,0.0,0.0)

:MISSN_12_OBJLOOP
wait 0
if and
03CA:   object 21@ exists 
03CA:   object 22@ exists 
03CA:   object 23@ exists 
03CA:   object 24@ exists 
jf @MISSN_12_OBJLOOP

Object.PutAt(21@,372.9,166.5,1007.2)
Object.PutAt(22@,373.1,166.0,1026.8)
Object.PutAt(23@,373.2,162.7,1024.8)
Object.PutAt(24@,346.7,162.1,1014.2)

Object.Angle(21@) = 90.0
Object.Angle(23@) = 180.0

// Sets up 8 victims
009A: 101@ = create_actor_pedtype 4 model #MAFBOSS at 331.5806 176.8772 1019.9844
009A: 102@ = create_actor_pedtype 5 model #SOFYBU at 371.4507 172.0065 1019.9844 
009A: 103@ = create_actor_pedtype 4 model #SBMYCR at 358.3979 198.2402 1019.9844 
009A: 104@ = create_actor_pedtype 4 model #WMYBU at 355.7233 161.1466 1019.9844 
009A: 105@ = create_actor_pedtype 5 model #SWFYRI at 354.015 160.9667 1019.9844
009A: 106@ = create_actor_pedtype 4 model #WMOMIB at 340.0487 171.522 1019.9944 
009A: 107@ = create_actor_pedtype 4 model #BMYMIB at 365.63 158.3375 1019.9844 
009A: 108@ = create_actor_pedtype 4 model #SOMYBU at 371.8111 177.6927 1019.9844 
017B: set_actor 106@ weapon 24 ammo_to 99999 
017B: set_actor 107@ weapon 24 ammo_to 99999  

Actor.Angle(101@) = 10.0 
Actor.Angle(102@) = 340.0 
Actor.Angle(103@) = 0.0 
Actor.Angle(104@) = 80.0 
Actor.Angle(105@) = 274.0
Actor.Angle(106@) = 260.0 
Actor.Angle(107@) = 0.0 
Actor.Angle(108@) = 3.0 

//Everyone is going somewhere or doing something.
05D3: AS_actor 101@ goto_point 338.1163 170.9245 1019.9844 mode 4 -2 ms // Candy_A
0605: actor 102@ perform_animation_sequence "SEAT_TALK_01" IFP_file "MISC" 4.0 loop 1 0 0 0 time -1 
05D3: AS_actor 103@ goto_point 365.9059 176.6189 1019.9844 mode 4 -2 ms // Xerox Copier
05D3: AS_actor 106@ goto_point 363.5529 170.5129 1019.9844 mode 4 -2 ms // MIB 1 
05D3: AS_actor 107@ goto_point 364.1616 197.666 1019.9844 mode 4 -2 ms  // MIB 2
05D3: AS_actor 108@ goto_point 330.6317 177.2622 1019.9912 mode 4 -2 ms // Candy_B 
0489: set_actor 2@ muted 1                   

Camera.SetPosition(361.499, 177.5805, 1021.0, 0.0, 0.0, 0.0) 
Camera.PointAt(348.0545, 173.4153, 1020.0, 2)

wait 2500
//Lights...
fade 1 1000  
:MISSN_12_FADEIN01 
wait 0
if
not fading
jf @MISSN_12_FADEIN01

05D3: AS_actor 2@ goto_point 354.223 169.843 1019.9912 mode 4 -2 ms
:MISSN_12_220 
wait 0
if
00EF:   actor 2@ 0 near_point 354.223 169.843 radius 2.0 2.0 stopped 
jf @MISSN_12_220

Camera.SetPosition(348.5041, 177.2998, 1019.9912, 0.0, 0.0, 0.0) 
Camera.PointAt(350.6485, 175.7552, 1019.9844, 2)
00BC: show_text_highpriority GXT 'ZOM04' time 10000 flag 1  
03CF: load_wav 44806 as 1  
gosub @MISSN_12_PLAYSND

Camera.SetBehindPlayer
Camera.Restore_WithJumpCut

05D3: AS_actor 2@ goto_point 350.6485 175.7552 1019.9844 mode 4 -2 ms 
:MISSN_12_230 
wait 0
if
00EF:   actor 2@ 0 near_point 350.6485 175.7552 radius 2.0 2.0 stopped 
jf @MISSN_12_230
00BC: show_text_highpriority GXT 'ZOM05' time 10000 flag 1  
03CF: load_wav 44807 as 1  
gosub @MISSN_12_PLAYSND
00BC: show_text_highpriority GXT 'ZOM06' time 10000 flag 1  
03CF: load_wav 44808 as 1  
gosub @MISSN_12_PLAYSND

05D3: AS_actor $PLAYER_ACTOR goto_point 371.7316 176.5086 1019.9844 mode 4 -2 ms
05D3: AS_actor 2@ goto_point 365.9214 175.3963 1019.9844 mode 4 -2 ms 
:MISSN_12_240 
wait 0
if
00EF:   actor 2@ 0 near_point 365.9214 175.3963 radius 2.0 2.0 stopped 
jf @MISSN_12_250  
0A1D: AS_actor $PLAYER_ACTOR rotate_to_and_look_at_actor 2@ 
00BC: show_text_highpriority GXT 'ZOM07' time 10000 flag 1  
03CF: load_wav 44809 as 1  
gosub @MISSN_12_PLAYSND        
05D3: AS_actor 2@ goto_point 366.1956 162.2604 1019.9844 mode 4 -2 ms 
:MISSN_12_250 

if
00EF:   actor 101@ 0 near_point 338.1163 170.9245 radius 2.0 2.0 stopped 
jf @MISSN_12_270
05D3: AS_actor 101@ goto_point 363.4108 171.2612 1019.9844 mode 4 -2 ms 
:MISSN_12_270 
if
00EF:   actor 103@ 0 near_point 365.9059 176.6189 radius 2.0 2.0 stopped 
jf @MISSN_12_280
05D3: AS_actor 103@ goto_point 369.6766 177.4804 1019.9844 mode 4 -2 ms 
:MISSN_12_280 
if
00EF:   actor 106@ 0 near_point 363.5529 170.5129 radius 2.0 2.0 stopped 
jf @MISSN_12_290
05D3: AS_actor 106@ goto_point 364.6176 175.0317 1019.9844 mode 4 -2 ms 
:MISSN_12_290 
if
00EF:   actor 107@ 0 near_point 364.1616 197.666 radius 2.0 2.0 stopped 
jf @MISSN_12_295
05D3: AS_actor 107@ goto_point 344.9225 178.459 1019.9844 mode 4 -2 ms 
:MISSN_12_295 

if
00EF:   actor 2@ 0 near_point 366.1956 162.2604 radius 2.0 2.0 stopped 
jf @MISSN_12_240

060A: create_decision_maker_type 0 store_to 99@
//Create Zombies
009A: 111@ = create_actor_pedtype 4 model #WMOTR1 at 363.0 159.0 1019.9844
009A: 112@ = create_actor_pedtype 4 model #BMOTR1 at 363.0 160.0 1019.9844 
009A: 113@ = create_actor_pedtype 4 model #WMORI at 364.0 159.0 1019.9844 
009A: 114@ = create_actor_pedtype 4 model #WMOST at 364.0 160.0 1019.9844 
009A: 115@ = create_actor_pedtype 4 model #WMYST at 365.5 159.0 1019.9844      
009A: 116@ = create_actor_pedtype 4 model #SBMOTR2 at 365.5 160.0 1019.9844
009A: 117@ = create_actor_pedtype 4 model #SWMOTR2 at 366.5 159.0 1019.9844    
009A: 118@ = create_actor_pedtype 4 model #SWMOTR3 at 366.5 160.0 1019.9844
05D3: AS_actor 2@ goto_point 366.5815 176.5162 1019.9844 mode 6 -2 ms 

01F7: set_player $PLAYER_CHAR ignored_by_cops true 
01F0: set_max_wanted_level_to 0 
0631: put_actor 2@ in_group $PLAYER_GROUP 

100@ = 0
:MISSN_12_300 
wait 0 
Actor.Health(111@(100@,8i)) = 100000                    //Like fighting 1000 men
0332: set_actor 111@(100@,8i) bleeding 1                //Blood Drips
0489: set_actor 111@(100@,8i) muted 1                   //They don't talk but we make them groan
0245: set_actor 111@(100@,8i) walk_style_to "SHUFFLE"   //Walk slow  
060B: set_actor 111@(100@,8i) decision_maker_to 99@     //Ingore getting shot and punched
00A0: store_actor 101@(100@,8i) position_to 51@ 52@ 53@ //Target Victim
05D3: AS_actor 111@(100@,8i) goto_point 51@ 52@ 53@  mode 4 -2 ms   //Stagger toward Victim
05DE: AS_actor 101@(100@,8i) walk_around_ped_path 
100@ += 1 
if
100@ == 8
jf @MISSN_12_300
Player.CanMove($PLAYER_CHAR) = True

00BC: show_text_highpriority GXT 'ZOM12' time 10000 flag 1  
03CF: load_wav 44815 as 1  
gosub @MISSN_12_PLAYSND    
00BC: show_text_highpriority GXT 'ZOM13' time 10000 flag 1 
// PA: Attention there has been containment breach in lab Q.
// Please use the stairs to evacuate the building.

02A3: enable_widescreen 0 
 
:MISSN_12_RUN
wait 0

if
00F2:   actor 2@ near_actor $PLAYER_ACTOR radius 1.0 1.0 0 
jf @MISSN_12_RUN
100@ = 0
00BC: show_text_highpriority GXT 'ZOM08' time 10000 flag 1  
03CF: load_wav 44810 as 1  
0949: link_wav 1 to_actor 2@  
gosub @MISSN_12_PLAYSND
00BC: show_text_highpriority GXT 'ZOM09' time 10000 flag 1  
03CF: load_wav 44811 as 1  
0949: link_wav 1 to_actor 2@  
gosub @MISSN_12_PLAYSND
03CF: load_wav 44812 as 1  
0949: link_wav 1 to_actor 2@  
gosub @MISSN_12_PLAYSND
:MISSN_12_FLOOR1
wait 0
//Actions from victims and zombies
gosub @MISSN_12_ACTIONS

//If victim is dead respawn 
if 
120@ == 0
then
gosub @MISSN_12_SPAWNVIC
end
//If zombie is dead respawn 
if 
121@ == 0
then
gosub @MISSN_12_SPAWNZOM
end
100@ += 1 
if
100@ == 8
then
100@ = 0
end
if  
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 368.7 162.2 1014.1776 radius 2.0 2.0 2.0                                    
jf @MISSN_12_FLOOR1
100@ = 0
//Moves everyone to player level
:MISSN_12_MOVEALL
wait 0
0208: 51@ = random_float_in_ranges 328.5 336.5  
0208: 52@ = random_float_in_ranges 170.5 178.0   
53@ = 1014.18
Actor.PutAt(101@(100@,8i),51@, 52@, 53@)
0208: 51@ = random_float_in_ranges 328.5 336.5  
0208: 52@ = random_float_in_ranges 170.5 178.0   
Actor.PutAt(111@(100@,8i),51@, 52@, 53@)
100@ += 1
if 
100@ == 8
jf @MISSN_12_MOVEALL
100@ = 0
95@ = 0
:MISSN_12_FLOOR2 
wait 0
//Actions from victims and zombies
gosub @MISSN_12_ACTIONS
//If victim is dead respawn
if 
120@ == 0
then
gosub @MISSN_12_SPAWNVIC
end
//If zombie is dead respawn
if 
121@ == 0
then
gosub @MISSN_12_SPAWNZOM
end
100@ += 1 
if
100@ == 8
then
100@ = 0
end
if  and
95@ == 0
not Actor.Dead(2@)
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 346.73 162.1 1014.18 radius 7.0 7.0 7.0                                    
then
95@ = 1
00BC: show_text_highpriority GXT 'ZOM10' time 10000 flag 1  
03CF: load_wav 44813 as 1 
0949: link_wav 1 to_actor 2@  
gosub @MISSN_12_PLAYSND
end
if  
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 346.73 162.1 1014.18 radius 2.0 2.0 2.0                                    
jf @MISSN_12_FLOOR2
Object.Destroy(24@)   //Pick up drug
if 
not Actor.Dead(2@)
then
00BC: show_text_highpriority GXT 'ZOM11' time 10000 flag 1  
03CF: load_wav 44814 as 1 
0949: link_wav 1 to_actor 2@  
gosub @MISSN_12_PLAYSND
end
:MISSN_12_FLOOR3 
wait 0 
//Actions from victims and zombies
gosub @MISSN_12_ACTIONS
//If victim is dead respawn
if 
120@ == 0
then
gosub @MISSN_12_SPAWNVIC
end
//If zombie is dead respawn
if 
121@ == 0
then
gosub @MISSN_12_SPAWNZOM
end
100@ += 1 
if
100@ == 8
then
100@ = 0
end  

if  
00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere 372.10 166.05 1008.38 radius 2.0 2.0 2.0                                    
jf @MISSN_12_FLOOR3
//Mission complete escaped Zombotech alive.
04BB: select_interior 0
04F9: set_interior 1 color_to 0 
04E4: unknown_refresh_game_renderer_at -1951.7543 639.9958 
0581: enable_radar true 
Actor.PutAt($PLAYER_ACTOR,-1951.7543,639.9958,46.5625)
0860: link_actor $PLAYER_ACTOR to_interior 0 
030C: progress_made += 1 
0394: play_music 1 
Player.ClearWantedLevel($PLAYER_CHAR)
01E3: show_text_1number_styled GXT 'M_PASS' number 8000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 8000
wait 5000 
0164: disable_marker $ZOMBO_MARKER
return

:MISSN_12_ACTIONS
//Get health of Victim and Zombie
0226: 120@ = actor 101@(100@,8i) health 
0226: 121@ = actor 111@(100@,8i) health 
//If victim is injured Changes to Zombie
if and
120@ > 0
120@ < 10 
then
0223: set_actor 101@(100@,8i) health_to 100000 
0332: set_actor 101@(100@,8i) bleeding 1 
0489: set_actor 101@(100@,8i) muted 1 
0245: set_actor 101@(100@,8i) walk_style_to "OLDMAN"
060B: set_actor 101@(100@,8i) decision_maker_to 99@  
0605: actor 101@(100@,8i) perform_animation_sequence "GETUP_FRONT" IFP_file "PED" 4.0 loop 0 0 0 0 time -1 
end   
//If the victim is zombie both go to the player
00A0: store_actor $PLAYER_ACTOR position_to 51@ 52@ 53@ 
if 
120@ > 90000
then
0603: AS_actor 101@(100@,8i) goto 51@ 52@ 53@ mode 4 timelimit -1 // versionC 
if 
121@ > 90000
then  
0603: AS_actor 111@(100@,8i) goto 51@ 52@ 53@  mode 4 timelimit -1 // versionC 
end
end
//If both Victim and Zombie are alive
if and
120@ > 10
120@ < 200
121@ > 0
then
//Zombie searches for live victim
if
121@ > 90000
then  
00A0: store_actor 101@(100@,8i) position_to 51@ 52@ 53@ 
05D3: AS_actor 111@(100@,8i) goto_point 51@ 52@ 53@  mode 4 -2 ms 
end
//If the victim is not a zombie flee from zombie
if
00F2:   actor 101@(100@,8i) near_actor 111@(100@,8i) radius 5.0 5.0 0 
then
00A0: store_actor 111@(100@,8i) position_to 51@ 52@ 53@ 
05DA: AS_actor 101@(100@,8i) run_away_in_panic_from 51@ 52@ 53@ away_radius 10.0 timelimit 2500 
end
//If the victim is near the zombie become a zombie
if 
00F2:   actor 101@(100@,8i) near_actor 111@(100@,8i) radius 1.0 1.0 0 
then
0605: actor 101@(100@,8i) perform_animation_sequence "KO_SHOT_STOM" IFP_file "PED" 4.0 loop 0 0 0 0 time -1 
0223: set_actor 101@(100@,8i) health_to 5 
end
end     
//If the player is near any zombie reduce health
//Note: Body armor won't help Zombies are diseased.
if and
121@ > 90000
00F2:   actor $PLAYER_ACTOR near_actor 111@(100@,8i) radius 1.0 1.0 0 
then
0226: 122@ = actor $PLAYER_ACTOR health 
122@ -= 1
0223: set_actor $PLAYER_ACTOR health_to 122@ 
end
if and
120@ > 90000
00F2:   actor $PLAYER_ACTOR near_actor 101@(100@,8i) radius 1.0 1.0 0 
then
0226: 122@ = actor $PLAYER_ACTOR health 
122@ -= 1
0223: set_actor $PLAYER_ACTOR health_to 122@
end

return

:MISSN_12_PLAYSND
wait 0
if 
03D0:   wav 1 loaded 
jf @MISSN_12_PLAYSND
03D1: play_wav 1 
:MISSN_12_PLAYING
wait 0
if 
03D2:   wav 1 ended 
jf @MISSN_12_PLAYING
040D: unload_wav 1 
return

//Zombie Maker
:MISSN_12_SPAWNZOM
0665: get_actor 111@(100@,8i) model_to 54@ 
Actor.DestroyWithFade(111@(100@,8i))  
wait 250 
//Spawn Behind Player
00A0: store_actor $PLAYER_ACTOR position_to 61@ 62@ 63@ 
6@ = Actor.Angle($PLAYER_ACTOR)
02F6: $TEMPVAR_FLOAT_1 = cosine 6@ 
02F7: $TEMPVAR_FLOAT_2 = sine 6@ 
$TEMPVAR_FLOAT_1 *= 2.0
$TEMPVAR_FLOAT_2 *= -2.0
0059: 61@ += $TEMPVAR_FLOAT_1 
0059: 62@ += $TEMPVAR_FLOAT_2 

Actor.Create(111@(100@,8i), 4, 54@, 61@, 62@, 63@)
0223: set_actor 111@(100@,8i) health_to 100000 
0332: set_actor 111@(100@,8i) bleeding 1 
0489: set_actor 111@(100@,8i) muted 1 
0245: set_actor 111@(100@,8i) walk_style_to "OLDMAN"
060B: set_actor 111@(100@,8i) decision_maker_to 99@  
05DE: AS_actor 111@(100@,8i) walk_around_ped_path
return
//Victim Zombie Maker
:MISSN_12_SPAWNVIC
0665: get_actor 101@(100@,8i) model_to 54@ 
Actor.DestroyWithFade(101@(100@,8i))
wait 250
//Spawn Behind Player
00A0: store_actor $PLAYER_ACTOR position_to 61@ 62@ 63@ 
6@ = Actor.Angle($PLAYER_ACTOR)
02F6: $TEMPVAR_FLOAT_1 = cosine 6@ 
02F7: $TEMPVAR_FLOAT_2 = sine 6@ 
$TEMPVAR_FLOAT_1 *= 2.0
$TEMPVAR_FLOAT_2 *= -2.0
0059: 61@ += $TEMPVAR_FLOAT_1 
0059: 62@ += $TEMPVAR_FLOAT_2 

Actor.Create(101@(100@,8i), 4, 54@, 61@, 62@, 63@)

0223: set_actor 101@(100@,8i) health_to 100000 
0332: set_actor 101@(100@,8i) bleeding 1 
0489: set_actor 101@(100@,8i) muted 1 
0245: set_actor 101@(100@,8i) walk_style_to "OLDMAN"
060B: set_actor 101@(100@,8i) decision_maker_to 99@

05DE: AS_actor 101@(100@,8i) walk_around_ped_path 
return

:MISSN_12_FAILED
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
return

:MISSN_12_CLEANUP
0004: $ONMISSION = 0 
Model.Destroy(#WMOSCI)
Model.Destroy(#WFYSTEW)
Model.Destroy(#WMOTR1)
Model.Destroy(#BMOTR1)
Model.Destroy(#WMORI)
Model.Destroy(#WMOST)
Model.Destroy(#WMYST)
Model.Destroy(#SBMOTR2)
Model.Destroy(#SWMOTR2)
Model.Destroy(#SWMOTR3)
Model.Destroy(#MAFBOSS)
Model.Destroy(#SOFYBU)
Model.Destroy(#SBMYCR)
Model.Destroy(#WMYBU)
Model.Destroy(#SWFYRI)
Model.Destroy(#WMOMIB)
Model.Destroy(#BMYMIB)
Model.Destroy(#SOMYBU)
Model.Destroy(#DESERT_EAGLE)
Model.Destroy(#CR1_DOOR)
Model.Destroy(#WAREHOUSE_DOOR2B)
Model.Destroy(#KMB_LOCKEDDOOR)
Model.Destroy(#GREEN_GLOOP)
00D8: mission_cleanup 
return

